
project(SimpleEngine)

cmake_minimum_required(VERSION 3.25)

set(QT_MIN_VERSION "5.5.0")
set(KF5_MIN_VERSION "5.21.0")
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui)
find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})

find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Plasma I18n Service)

include(KDECMakeSettings)
include(KDECompilerSettings)
include(KDEInstallDirs)
include(ECMPackageConfigHelpers)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

add_library(plasma_dataengine_example_simpleEngine MODULE simpleEngine.cpp)

target_link_libraries(plasma_dataengine_example_simpleEngine
  Qt${QT_MAJOR_VERSION}::Gui
  KF5::Plasma
  KF5::Service
  KF5::I18n
)

install(TARGETS plasma_dataengine_example_simpleEngine DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/dataengine)

